package com.ap.core.validation.message.rules;

import com.ap.core.common.types.MessageStatus;
import com.ap.core.message.managerefund.info.RequestRetrieveRefundAccountInfo;
import com.ap.core.validation.message.info.MessageValidationInfo;
import com.ap.core.validation.message.info.RefundOriginalInfo;
import com.ap.core.validation.rules.AbstractValidationRule;

/**
 * User: Gibu.Paul 
 * State of the target APTRANSACTIONID should be in AUTHORISED
 * state
 */
public class SV0003Rule
		extends
		AbstractValidationRule<MessageValidationInfo<RequestRetrieveRefundAccountInfo, RefundOriginalInfo>> {

	@Override
	public boolean validate(
			MessageValidationInfo<RequestRetrieveRefundAccountInfo, RefundOriginalInfo> infoObject) {

		return infoObject.getOriginalInfo().isOrderPaymentExists(MessageStatus.AUTHORISED);
	}

}
